<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php require_once('inc/head.php'); ?>
<script type="text/javascript">
	window.fbAsyncInit = function() { FB.Canvas.setAutoGrow(); }
</script>
</head>

<body>
<?php 

	if($pageType == 'forgot') { include("forgot.php"); }
	elseif(!is_logged_in()) { include("splash.php"); }
	else {
		if($pageerror == 1) { include('errorpage.php'); } 
		elseif($pageType == 'hot' || $pageType == 'fresh') { include("home.php"); }
		elseif($pageType == 'profile' && $id != NULL) { include("profile.php"); }
		elseif($pageType =='story' && $id != NULL ) { include("story.php"); }
		elseif($pageType == 'settings') { include("setting.php"); }
		elseif($pageType == 'notifications') { include("notifications.php"); }
	}
?>

<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
	FB.init({
	appId : '121002954671792',
	status : true, // check login status
	cookie : true, // enable cookies to allow the server to access the session
	xfbml : true // parse XFBML
});
</script>
</body>
</html>
